﻿<%@ Page Title="" Language="C#" MasterPageFile="~/layout/admin.Master" AutoEventWireup="true" CodeBehind="AdminCategory.aspx.cs" Inherits="SinhNhat.admin.AdminCategory" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMain" runat="server">
    <script type="text/javascript" language="javascript">
        function Valid() {
            var text = document.getElementById("<%=txtNew.ClientID %>");
            if (text.value == "") {
                alert("Nhập tên cateogory");
                text.focus();
                return false;
            }

            return true;
        }
    </script>

    <asp:ScriptManager ID="scriptmanager" runat="server" />

    <asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            
            <asp:HiddenField ID="hdIndex" runat="server" />

            <table>
                <tr>
                    <td>
                        <asp:ListBox ID="lbCategory" runat="server" Width="300px" Height="300px" />
                    </td>
                    <td>
                        <asp:Button ID="btnUp" runat="server" Text="Up" /><br />
                        <asp:Button ID="btnDown" runat="server" Text="Down" />
                    </td>
                </tr>
            </table>
        
        </ContentTemplate>
    </asp:UpdatePanel>

    <div >
        <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="/data/images/pencil.png" />
        <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="/data/images/delete.gif" OnClientClick="return confirm('Are you sure?');" />
    </div>

    <div>
        <table>
            <tr>
                <td>Category name</td>
                <td>
                    <asp:TextBox ID="txtNew" runat="server" />
                </td>
            </tr>
        </table>
        <asp:ImageButton ID="btnAdd" runat="server" ImageUrl="/data/images/add.png" OnClientClick="return Valid();" />
    </div>
</asp:Content>
